home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part1 / 4324 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.8 KB

  1. Path: jupiter.sun.csd.unb.ca!dwoo
  2. From: dwoo@jupiter.sun.csd.unb.ca (Dennis K. C. Woo)
  3. Newsgroups: comp.lang.c
  4. Subject: Please help a novice to build a 32-bit Windows DLL...
  5. Date: 3 Feb 1996 15:59:05 GMT
  6. Organization: University of New Brunswick, Fredericton, NB, Canada
  7. Message-ID: <4f00o9$c99@sol.sun.csd.unb.ca>
  8. NNTP-Posting-Host: jupiter-alt3.unb.ca
  9.  
  10.  
  11. Hi experts, 
  12.  
  13. I have some mathematical codes (using std C libraries and do not call any OS's
  14. APIs) that are written and tested under OS/2. Now I would like to build a 
  15. Windows 3.1 32-bit DLL. Under OS/2, building the DLL is very easy -- just like
  16. building any OS/2 executables. However, it seems that building DLL for 
  17. Windows 3.1 is more difficult than I thought originally. I am using Watcom
  18. C/C++ compiler for my programming. Suppose I would like to make the following 
  19. codes into a 32-Bit DLL:
  20.  
  21.     typedef struct { int a, int b, double *x } A_Structure ;
  22.  
  23.     A_Structure Function1( int x, int y, double x, char * p )
  24.     {
  25.         /* some codes.                     */
  26.         /* this program call a function from a 32-bit    */ 
  27.         /* windows library, say library1.lib        */
  28.     }
  29.  
  30.     double Function2( double dummy )
  31.     {
  32.         /* some codes here */
  33.     }
  34.  
  35. Please assume that I do not know anything about Windows 3.1 programming 
  36. convention etc.. How would I convert this code into a Windows 32-bit DLL using
  37. Watcom's compiler and linker?
  38.  
  39. Your help will be much appreciated! Thanks a million!
  40.  
  41. Dennis
  42. *****************************************************************
  43. *  Dennis Woo              Department of Mechanical Engineering *
  44. *  E-mail: dwoo@unb.ca     University of New Brunswick          *
  45. *  Office Tel: (506) 447-3076                 --------  __o     *       
  46. *  Voice mail: (506) 453-0614                -------  _`\<,_    *
  47. *  FAX       : (506) 453-5025               -------  (*)/ (*)   *
  48. *****************************************************************    
  49.